home *** CD-ROM | disk | FTP | other *** search
/ IRIX 5.3 for Indy R4400 / IRIX 5.3 for Indy R4400 175MHz.img / dist / eoe2.idb / usr / sadm / install / scripts / r.build.z / r.build
Text File  |  1995-02-28  |  552b  |  36 lines

  1. #ident    "@(#)oampkg:pkgscripts/r.build    1.6"
  2.  
  3. error=no
  4. while read dest
  5. do
  6.     if [ -d $dest ]
  7.     then
  8.         echo "$dest"
  9.         rmdir $dest || error=yes
  10.     elif [ -f $dest ]
  11.     then
  12.         echo "Modifying $dest"
  13.  
  14.         savepath=$PKGSAV/build${dest}
  15.         chmod +x $savepath
  16.         if $savepath remove $dest > /tmp/$$build
  17.         then
  18.             if [ ! -s /tmp/$$build ]
  19.             then
  20.                 rm -f $dest
  21.             else
  22.                 cp /tmp/$$build $dest || error=yes
  23.             fi
  24.         else
  25.             error=yes
  26.         fi
  27.         rm -f /tmp/$$build
  28.     else
  29.         [ -r $dest ] && echo "$dest"
  30.         rm -f $dest || error=yes
  31.     fi
  32. done
  33. [ "$error" = yes ] &&
  34.     exit 2
  35. exit 0
  36.